package com.kitty.game.fight.artifact.passive;

import com.kitty.game.fight.bean.Fight;
import com.kitty.game.fight.bean.FightObject;
import com.kitty.common.utils.SpringUtils;
import com.kitty.game.artifact.ArtifactService;

/**
 * 混元金斗
 * 有几率将物理攻击伤害提升至2.5倍（力破千钧副目标伤害只提升至2倍）
 */
public class DipperArtifactEffect extends ArtifactEffect {

    public ArtifactType getType() {
        return ArtifactType.DIPPER;
    }

    @Override
    public short getEffectId() {
        return 8016;
    }

    @Override
    public Boolean trigger(Fight fight, FightObject member, Object... params) {
        /**超级boss另外判断*/
        if (member.isSuperBoss()) {
            return (Boolean) tirggerSuperBoss(fight, member, params);
        }

        if (!checkBaseCondition(fight, member)) {
            return false;
        }
        ArtifactService artifactService = SpringUtils.getBean(ArtifactService.class);
        return artifactService.getArtifactRate(getType().getName(), member.getRole());
    }

}
